package com.mutouren.modules.datapush.base;

public enum MethodType {
	GET((byte)0, "GET"),
	POST((byte)1, "POST");
	
	public final byte value;
	public final String name;

	private MethodType(byte value, String name) {
		this.value = value;		
		this.name = name;
	}
	
	public static MethodType valueOf(byte value) {
		MethodType result = null;
		
		switch(value) {
		case 0: result = GET; break;
		case 1: result = POST; break;
		}
		
		return result;
	}
	
	public static void main(String[] args) {	
		System.out.println(MethodType.POST.toString());
	}	
}

// 方法类型: 0 get 1 post